void ViewProfile(Int_t c)
{
  TFile *file = new TFile("MergedOutput.root"); //name of file to be analyzed

  //TList *list = (TList *)file->Get("MCtrueOutput");

  TList *list = (TList *)file->Get("outputPhi");

  THnSparseF* myhist = (THnSparseF*) list->FindObject(Form("fPhi18Eta%d",c));
  //myhist->GetAxis(0)->SetRangeUser(0,5);//cut on centrality
  TH2D *NN = myhist->Projection(6,7,"E");//which values we want to consider, Y, X

  // for pp they are Np_B, Np_F, Nm_B, Nm_F, Nch_B, Nch_F, NetCh_B, NetCh_F, PtMean_B, PtMean_F

  //for PbPb lCentrality, Np_B, Np_F, Nm_B, Nm_F, Nch_B, Nch_F, NetCh_B, NetCh_F, PtMean_B, PtMean_F for PbPb

  TH1D *NNCorrFunc = (TH1D*)NN->ProfileX();
  TCanvas *c1 = new TCanvas("name","title",50,0,500,500);
  c1->Divide(1,2);
  //gStyle->SetOptStat(11);
  c1->cd(1);
  //NpNpCorrFunc->GetXaxis()->SetRangeUser(0,450);
  //c1->GetXAxis()->SetName("Net charge in forward window a.u.");
  NN->Draw("COLZ");
  c1->cd(2);
  NNCorrFunc->Fit("pol1");
  //return b;
  //delete NNCorrFunc;
  //delete myhist;
  //delete NN;

}
